package com.analysis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 豆包智能体配置
 *
 * @Date 2025/9/8
 * @Author 蒋棒
 */
@Component
@ConfigurationProperties(prefix = "doubao.chat")
public class DoubaoChatConfig {
    
    /**
     * API密钥
     */
    private String apiKey;
    
    /**
     * Bot ID
     */
    private String botId;
    
    /**
     * 基础URL
     */
    private String baseUrl = "https://ark.cn-beijing.volces.com/api/v3/";
    
    /**
     * 连接超时时间（秒）
     */
    private int connectTimeout = 30;
    
    /**
     * 读取超时时间（秒）
     */
    private int readTimeout = 120;
    
    /**
     * 重试次数
     */
    private int retryTimes = 2;
    
    /**
     * 连接池最大连接数
     */
    private int maxConnections = 5;
    
    /**
     * 连接池保活时间（秒）
     */
    private int keepAliveTime = 1;
    
    /**
     * 是否启用日志记录
     */
    private boolean enableLogging = true;
    
    /**
     * 是否启用性能监控
     */
    private boolean enablePerformanceMonitoring = true;
    
    public String getApiKey() {
        return apiKey;
    }
    
    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }
    
    public String getBotId() {
        return botId;
    }
    
    public void setBotId(String botId) {
        this.botId = botId;
    }
    
    public String getBaseUrl() {
        return baseUrl;
    }
    
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }
    
    public int getConnectTimeout() {
        return connectTimeout;
    }
    
    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }
    
    public int getReadTimeout() {
        return readTimeout;
    }
    
    public void setReadTimeout(int readTimeout) {
        this.readTimeout = readTimeout;
    }
    
    public int getRetryTimes() {
        return retryTimes;
    }
    
    public void setRetryTimes(int retryTimes) {
        this.retryTimes = retryTimes;
    }
    
    public int getMaxConnections() {
        return maxConnections;
    }
    
    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }
    
    public int getKeepAliveTime() {
        return keepAliveTime;
    }
    
    public void setKeepAliveTime(int keepAliveTime) {
        this.keepAliveTime = keepAliveTime;
    }
    
    public boolean getEnableLogging() {
        return enableLogging;
    }
    
    public void setEnableLogging(boolean enableLogging) {
        this.enableLogging = enableLogging;
    }
    
    public boolean getEnablePerformanceMonitoring() {
        return enablePerformanceMonitoring;
    }
    
    public void setEnablePerformanceMonitoring(boolean enablePerformanceMonitoring) {
        this.enablePerformanceMonitoring = enablePerformanceMonitoring;
    }
}
